1. Field of the Invention
The invention relates to a semiconductor storage apparatus and a microcomputer having the same.
2. Description of the Related Art
As to a nonvolatile semiconductor storage apparatus such as a flash memory and an EEPROM capable of deleting and rewriting electrically and retaining the stored data even when the power of the apparatus is turned off, FIG. 4 shows an example of the structure of a memory cell of the nonvolatile semiconductor storage apparatus. The memory cell provided to the semiconductor storage apparatus has a floating gate through insulating films 43 and 44 between a control gate 41, and a drain 45 and a source 46. Injection and release of electrons into/from the floating gate 42 are carried out by applying a predetermined voltage to the control gate 41, the drain 45 and the source 46. See for example Japanese Patent Application Laid-open Publication No. 1999-283379.
Here, when electrons are injected into the floating gate 42 and a negative charge is accumulated, a predetermined positive voltage applied to the control gate 41 is canceled by this negative charge and the state of conduction between the drain 45 and the source 46 becomes “not conducted (OFF)”. On the other hand, when electrons are released from the floating gate 42 and the charge is eliminated, a current flows between the drain 45 and the source 46 and the state becomes “conducted (ON)” due to application of a predetermined positive voltage to the control gate 41.
In the semiconductor storage apparatus, in order to identify the conducted state and the not-conducted state between the drain 45 and the source 46, as shown in FIG. 5, a sense amplifier (hereinafter, referred to as “sense amplifier for NORMAL) is provided, that compares a read-out voltage Vr (positive side) with a predetermined threshold voltage Vnormal (negative side) from a predetermined strobe position of the memory cell and outputs a voltage Vout indicating a logical value “0 (not conducted)” or a logical value “1 (conducted)”. For example, in the case where the state of conduction between the drain 45 and the source 46 is not conductive, the read-out voltage Vr becomes lower than the threshold voltage Vnormal and the sense amplifier 12 for NORMAL outputs the voltage Vout indicating the logical value “0”. On the other hand, in the case where the state of conduction between the drain 45 and the source 46 is conductive, the read-out voltage Vr becomes equal to or higher than the threshold voltage Vnormal and the sense amplifier 12 for NORMAL outputs the voltage Vout indicating the logical value “1”.
By the way, maintaining predetermined specification as the data retention characteristics is required to a nonvolatile semiconductor storage apparatus. However, “data retention” and “read disturb” are faults for the specifications. Data retention refers to a fault in which electrons are gradually injected into the floating gate for some reason regardless of whether the power is turned on or off in the state where electrons are released from the floating gate by the cancellation. Read disturb refers to a fault in which electrons injected into the floating gate by writing operation are gradually released by repeating reading operation for many times.
Here, the fact is known that electrons injected into the floating gate are electronically trapped in the insulating films around the floating gate or vanished by heat energy due to degradation of the memory cell accompanied by use of the semiconductor storage apparatus over time, etc. and, therefore, the data retention and the read disturb become more serious.
FIG. 6 illustrates the input/output characteristics of the memory cell in the semiconductor storage apparatus. A gate voltage Vg shown in the figure is a voltage applied to the control gate when data stored and retained in the memory cell are read out. As the data retention or the read disturb becomes more serious, the input/output characteristics of the memory cell in the case where a charge is present in the floating gate, shifts from 50a to 50b. Therefore, the level of the read-out voltage Vr of the memory cell decreases from Va to Va′. Va′ is arranged to be equal to or higher than Vnormal. That is, in the sense amplifier 12 for NORMAL, the difference between the read-out voltage Vr and the threshold voltage Vnormal indicating a section (hereinafter, referred to as “MRG (Margin) 1”) for which the logical value becomes “1” decreases from |Va−Vnormal| to |Va′−Vnormal|.
On the other hand, similarly, in the case where a charge is not present in the floating gate, as the data retention or the read disturb becomes more serious, the input/output characteristics of the memory cell shifts from 51a to 51b. Therefore, the level of the read-out voltage Vr of the memory cell increases from Vb to Vb′. Vb′ is arranged to be lower than Vnormal. That is, in the sense amplifier 12 for NORMAL, the difference between the read-out voltage Vr and the threshold voltage Vnormal indicating a section (hereinafter, referred to as “MRG (Margin) 0”) for which the logical value becomes “0” decreases from |Vnormal−Vb| to |Vnormal−Vb′|.
However, even when the read-out voltage Vr of the memory cell varies from Va to Va′ or from Vb to Vb′ as the data retention or the read disturb becomes more serious, the sense amplifier 12 for NORMAL outputs a voltage indicating a reasonable logical value by comparing the output voltage Va′ or Vb′ of the memory cell with the threshold voltage Vnormal. That is, according to the mechanism of a conventional semiconductor storage apparatus, even when an indication of the worsening of the data retention or the read disturb is present, it is difficult to detect the indication as an error.
Furthermore, when Va′ varied from Va becomes lower than Vnormal or when Vb′ varied from Vb becomes equal to or higher than Vnormal as the data retention or the read disturb becomes more serious, the sense amplifier 12 for NORMAL outputs a voltage indicating an unreasonable logical value. Thereby, in systems such as a microcomputer installed with the semiconductor storage apparatus, signals indicating the unreasonable logical value outputted from the sense amplifier 12 for NORMAL are used. Therefore, a possibility that system errors are caused to occur arises.